package com.itheima.tingchechang;

import java.util.concurrent.Semaphore;

public class Demo01 {


    public static void main(String[] args) {

        Semaphore park = new Semaphore(3);

        for (int i = 0; i < 10; i++) {
            Che che = new Che(park);
            Thread t = new Thread(che);
            t.setName(i+"号车");
            t.start();
        }


    }
}
